#include <spu_mfcio.h>
#include <spu_intrinsics.h>
#include <stdlib.h>
#include <stdio.h>
#include "../ubicus.h"
/*recurence de henon
* x(n+1) = y(n)+1-ax*(n)²
* y(n+1) = b*x(n)
*/


void recu(vector PRECISION * x,  vector PRECISION * y, vector PRECISION a, vector PRECISION b)
{
  vector PRECISION tmpx = *x;
#ifdef ENFLOAT
  vector PRECISION un = {1,1,1,1};
#else
  vector PRECISION un = {1,1};
#endif
  *x = spu_mul(tmpx,tmpx);
  *x = spu_mul(a, *x);
  *x = spu_sub( spu_add(*y,un), *x);
  *y = spu_mul(b, tmpx);
}
